<!DOCTYPE html>
<!-- ng-app -->
<html lang="en" ng-app="app">
<head>
    <meta charset="UTF-8">
    <title></title>
    <script src="../../../js/plugins/angular/angular.min.js" type="text/javascript"></script>
</head>
<body>
    <div ng-controller="cont">
        <div>图书ISBN号：{{BOOK}}</div><!-- 值为273895732894 -->
        <div>美元兑换价：{{USD}}</div><!-- 值为600 -->
    </div>

    <script>
        angular.module('app',[])
            .constant('$ISBN',{
                BOOK:"273895732894"
            })
            .value('$RATE',{
                USD:614.28
            })
            .controller('cont',function ($scope,$ISBN,$RATE) {
                var n = 600;

                /* 重置 */
                angular.extend($RATE, { USD : n });
                $scope.BOOK = $ISBN.BOOK;
                $scope.USD = $RATE.USD;
            })

    </script>
</body>
</html>